<template>
  <div>
    <el-container id="wrap">
      <el-header id="zhead">
        <el-row>
          <el-col :span="12">欢迎使用东软云HIS医疗管理信息系统</el-col>
          <el-col :offset="6" :span="6">
            <el-dropdown @command="handleCommand">
              <span class="el-dropdown-link">
                {{user.realname}}<i class="el-icon-arrow-down el-icon--right"></i>
              </span>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item command="Setting">个人设置</el-dropdown-item>
                <el-dropdown-item command="Logout">退出登录</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
            </el-col>
        </el-row>
      </el-header>
      <el-container>
        <el-aside class="zleft" width="200px">
          <Menu></Menu>
        </el-aside>
        <el-main><router-view/></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Menu from '@/views/comp/menu'
export default {
  name: "Index",
  data() {return {
    user:{
      realname: 'admin'
    }
  }},
  components:{
    Menu
  },
  methods: {
    handleCommand(command){
      if(command === 'Setting')
      {
        console.log('setting')
      }
      else if(command === 'Logout')
      {
        console.log('logout')
      }
    }
  }
}
</script>

<style scoped>
#wrap{
  height: 100vh;
  
}
#zhead {
  background: hsl(199, 93%, 62%);
  border-bottom: #ff0000 2px solid;
  line-height: 60px;
  font-size: 1.5rem;
  font-weight: bold;
}
.zleft {
  border-right: #ff0000 2px solid;
}
</style>